<?php
    $newsID = $_GET['newsID'];
    require('db_connection.php');
    $query = "SELECT * FROM tblnews ";
    $result = mysql_query($query);
    $query1 = "SELECT MAX(newsID) FROM tblnews";
    $result1 = mysql_query($query1);
    while($row=mysql_fetch_array($result1))
    {
      $newscount  = $row['MAX(newsID)'];
    }
    if($newscount>5)
    {
      $start = $newscount-5;
    }
    else
    {
      $start = $newscount;
    }
 

?>
<html>
 <head>
      <title>La Union Online Library System -- Home</title>
      <meta http-equiv='generator' content='PHP Designer 2005' />
      <style type="text/css">
        @import url(style.css);
      </style>
   </head>
   <body>
<table width='100%' height='100%' valign='top'>
     <tr><td class='tableheader'>Library Updates</td></tr>
     <tr><td > </td></tr>
   
    <?php
    while($row=mysql_fetch_array($result))
    {
      echo"<tr><td class='news'><a href='newscontent?newsID=$row[0]'>";
      echo $row[1];
      echo"</a></td></tr>";
      echo"<tr><td > </td></tr>";
      

    }
    ?>
    
    
</table>
</body>
<html>
